package com.xmg.design23.d7_compose;

/**
 * @Author: mazhongqing
 * @Date: 2021/3/24 16:25
 */
public abstract class Component {
    //职位
    private String position;
    //工作内容
    private String job;

    public Component(String position, String job) {
        this.position = position;
        this.job = job;
    }

    //本职工作
    public void work(){
        System.out.println("我是"+position+",我在"+job);
    }

    abstract void check();
}
